import {type VxeColumnPropTypes} from "vxe-table/types/column"

const solts: VxeColumnPropTypes.Slots = {
  default: ({row, column}) => {
    const cellValue = row[column.field]
    let type
    let value
    switch (row.bugLevel) {
      case 1:
        type = "success"
        value = "低危"
        break
      case 2:
        type = "warning"
        value = "中危"
        break
      case 3:
        type = "danger"
        value = "高危"
        break
      default:
        type = "info"
        value = "N/A"
        break
    }
    return [<span class={`el-tag el-tag--${type} el-tag--plain`}>{value}</span>]
  }
}

export default solts
